package scu.maqiang.tiangong;

import scu.maqiang.mesh.Mesh3T3S;
import scu.maqiang.mesh.MeshFormat;

public class MainEngineMeshConstrcutor {

	public static void main(String[] args) {
		String dir = "TianGong\\MainEngine\\";
		String fileName = dir + "TGT100-1_a0_wall1.dat";
		Mesh3T3S mesh1 = new Mesh3T3S();
		mesh1.readMesh(MeshFormat.msh, fileName);
		mesh1.toTecplot(dir + "engine1.dat");
		System.out.println("Mesh1 Info: ");
		System.out.println("nv: " + mesh1.getNv() + "\tnt: " + mesh1.getNt());
//===================================================================
		fileName = dir + "TGT100-1_a0_wall2.dat";
		Mesh3T3S mesh2 = new Mesh3T3S();
		mesh2.readMesh(MeshFormat.msh, fileName);
		mesh2.toTecplot(dir + "engine2.dat");
		System.out.println("Mesh2 Info: ");
		System.out.println("nv: " + mesh2.getNv() + "\tnt: " + mesh2.getNt());
		
		mesh1.add(mesh2);
		System.out.println("Mesh1 + Mesh2 Info: ");
		System.out.println("nv: " + mesh1.getNv() + "\tnt: " + mesh1.getNt());
		mesh1.toTecplot(dir + "engine12.dat");
		//===================================================================		
		fileName = dir + "TGT100-1_a0_wall3.dat";
		Mesh3T3S mesh3 = new Mesh3T3S();
		mesh3.readMesh(MeshFormat.msh, fileName);
		mesh3.toTecplot(dir + "engine3.dat");
		System.out.println("Mesh3 Info: ");
		System.out.println("nv: " + mesh3.getNv() + "\tnt: " + mesh3.getNt());
		
		mesh1.add(mesh3);
		System.out.println("Mesh1 + Mesh2 + Mesh3 Info: ");
		System.out.println("nv: " + mesh1.getNv() + "\tnt: " + mesh1.getNt());
		mesh1.toTecplot(dir + "engine123.dat");
		
		//===================================================================
		fileName = dir + "TGT100-1_a0_wall4.dat";
		Mesh3T3S mesh4 = new Mesh3T3S();
		mesh4.readMesh(MeshFormat.msh, fileName);
		mesh4.toTecplot(dir + "engine4.dat");
		System.out.println("Mesh4 Info: ");
		System.out.println("nv: " + mesh4.getNv() + "\tnt: " + mesh4.getNt());
		
		mesh1.add(mesh4);
		System.out.println("Mesh1 + Mesh2 + Mesh3 + Mesh4 Info: ");
		System.out.println("nv: " + mesh1.getNv() + "\tnt: " + mesh1.getNt());
		mesh1.toTecplot(dir + "engine1234.dat");
		
		//===================================================================
		fileName = dir + "TGT100-1_a0_wall5.dat";
		Mesh3T3S mesh5 = new Mesh3T3S();
		mesh5.readMesh(MeshFormat.msh, fileName);
		mesh5.toTecplot(dir + "engine5.dat");
		System.out.println("Mesh5 Info: ");
		System.out.println("nv: " + mesh5.getNv() + "\tnt: " + mesh5.getNt());
		
		mesh1.add(mesh5);
		System.out.println("Mesh1 + Mesh2 + Mesh3 + Mesh4 + Mesh5 Info: ");
		System.out.println("nv: " + mesh1.getNv() + "\tnt: " + mesh1.getNt());
		mesh1.toTecplot(dir + "engine12345.dat");
		
		//===================================================================
		fileName = dir + "TGT100-1_a0_wall6.dat";
		Mesh3T3S mesh6 = new Mesh3T3S();
		mesh6.readMesh(MeshFormat.msh, fileName);
		mesh6.toTecplot(dir + "engine6.dat");
		System.out.println("Mesh6 Info: ");
		System.out.println("nv: " + mesh6.getNv() + "\tnt: " + mesh6.getNt());
		
		mesh1.add(mesh6);
		System.out.println("Mesh1 + Mesh2 + Mesh3 + Mesh4 + Mesh5 + Mesh6 Info: ");
		System.out.println("nv: " + mesh1.getNv() + "\tnt: " + mesh1.getNt());
		mesh1.toTecplot(dir + "engine123456.dat");
		
		//===================================================================
		fileName = dir + "TGT100-1_a0_wall7.dat";
		Mesh3T3S mesh7 = new Mesh3T3S();
		mesh7.readMesh(MeshFormat.msh, fileName);
		mesh7.toTecplot(dir + "engine7.dat");
		System.out.println("Mesh7 Info: ");
		System.out.println("nv: " + mesh7.getNv() + "\tnt: " + mesh7.getNt());
		
		mesh1.add(mesh7);
		System.out.println("Mesh1 + Mesh2 + Mesh3 + Mesh4 + Mesh5 + Mesh6 + Mesh7 Info: ");
		System.out.println("nv: " + mesh1.getNv() + "\tnt: " + mesh1.getNt());
		mesh1.toTecplot(dir + "engine1234567.dat");
		
		//===================================================================
		fileName = dir + "TGT100-1_a0_wall8.dat";
		Mesh3T3S mesh8 = new Mesh3T3S();
		mesh8.readMesh(MeshFormat.msh, fileName);
		mesh8.toTecplot(dir + "engine8.dat");
		System.out.println("Mesh8 Info: ");
		System.out.println("nv: " + mesh8.getNv() + "\tnt: " + mesh8.getNt());
		
		mesh1.add(mesh8);
		System.out.println("Mesh1 + Mesh2 + Mesh3 + Mesh4 + Mesh5 + Mesh6 + Mesh7 + Mesh8 Info: ");
		System.out.println("nv: " + mesh1.getNv() + "\tnt: " + mesh1.getNt());
		mesh1.toTecplot(dir + "engine12345678.dat");
		
		//===================================================================
		fileName = dir + "TGT100-1_a0_wall9.dat";
		Mesh3T3S mesh9 = new Mesh3T3S();
		mesh9.readMesh(MeshFormat.msh, fileName);
		mesh9.toTecplot(dir + "engine9.dat");
		System.out.println("Mesh9 Info: ");
		System.out.println("nv: " + mesh9.getNv() + "\tnt: " + mesh9.getNt());
		
		mesh1.add(mesh9);
		System.out.println("Mesh1 + Mesh2 + Mesh3 + Mesh4 + Mesh5 + Mesh6 + Mesh7 + Mesh8 + Mesh9 Info: ");
		System.out.println("nv: " + mesh1.getNv() + "\tnt: " + mesh1.getNt());
		mesh1.toTecplot(dir + "engine123456789.dat");
		
		//===================================================================
		fileName = dir + "TGT100-1_a0_wall10.dat";
		Mesh3T3S mesh10 = new Mesh3T3S();
		mesh10.readMesh(MeshFormat.msh, fileName);
		mesh10.toTecplot(dir + "engine10.dat");
		System.out.println("Mesh10 Info: ");
		System.out.println("nv: " + mesh10.getNv() + "\tnt: " + mesh10.getNt());
		
		mesh1.add(mesh10);
		System.out.println("Mesh123456789 + Mesh10 Info: ");
		System.out.println("nv: " + mesh1.getNv() + "\tnt: " + mesh1.getNt());
		mesh1.toTecplot(dir + "engine910.dat");
		
		//===================================================================
		fileName = dir + "TGT100-1_a0_wall11.dat";
		Mesh3T3S mesh11 = new Mesh3T3S();
		mesh11.readMesh(MeshFormat.msh, fileName);
		mesh11.toTecplot(dir + "engine11.dat");
		System.out.println("Mesh11 Info: ");
		System.out.println("nv: " + mesh11.getNv() + "\tnt: " + mesh11.getNt());
		
		mesh1.add(mesh11);
		System.out.println("Mesh123456789 + Mesh10 + Mesh11 Info: ");
		System.out.println("nv: " + mesh1.getNv() + "\tnt: " + mesh1.getNt());
		mesh1.toTecplot(dir + "engine911.dat");
		
		//===================================================================
		fileName = dir + "TGT100-1_a0_wall12.dat";
		Mesh3T3S mesh12 = new Mesh3T3S();
		mesh12.readMesh(MeshFormat.msh, fileName);
		mesh12.toTecplot(dir + "engine12.dat");
		System.out.println("Mesh12 Info: ");
		System.out.println("nv: " + mesh12.getNv() + "\tnt: " + mesh12.getNt());
		
		mesh1.add(mesh12);
		System.out.println("Mesh123456789 + Mesh10 + Mesh11 + Mesh12 Info: ");
		System.out.println("nv: " + mesh1.getNv() + "\tnt: " + mesh1.getNt());
		mesh1.toTecplot(dir + "engine912.dat");

		//===================================================================
		fileName = dir + "TGT100-1_a0_wall13.dat";
		Mesh3T3S mesh13 = new Mesh3T3S();
		mesh13.readMesh(MeshFormat.msh, fileName);
		mesh13.toTecplot(dir + "engine13.dat");
		System.out.println("Mesh13 Info: ");
		System.out.println("nv: " + mesh13.getNv() + "\tnt: " + mesh13.getNt());
		
		mesh1.add(mesh13);
		System.out.println("Mesh123456789 + Mesh10 + Mesh11 + Mesh12 + Mesh13 Info: ");
		System.out.println("nv: " + mesh1.getNv() + "\tnt: " + mesh1.getNt());
		mesh1.toTecplot(dir + "engine913.dat");
		
		//===================================================================
		fileName = dir + "TGT100-1_a0_wall14.dat";
		Mesh3T3S mesh14 = new Mesh3T3S();
		mesh14.readMesh(MeshFormat.msh, fileName);
		mesh14.toTecplot(dir + "engine14.dat");
		System.out.println("Mesh14 Info: ");
		System.out.println("nv: " + mesh14.getNv() + "\tnt: " + mesh14.getNt());
		
		mesh1.add(mesh14);
		System.out.println("Mesh123456789 + Mesh10 + Mesh11 + Mesh12 + Mesh13 + Mesh14 Info: ");
		System.out.println("nv: " + mesh1.getNv() + "\tnt: " + mesh1.getNt());
		mesh1.toTecplot(dir + "engine914.dat");
		
		//===================================================================
		Mesh3T3S Newmesh1 = new Mesh3T3S();
		Newmesh1.reflectXY(mesh1);
		Newmesh1.toTecplot(dir + "engineNew1.dat");
		System.out.println("MeshNew1 Info: ");
		System.out.println("nv: " + Newmesh1.getNv() + "\tnt: " + Newmesh1.getNt());
		
		mesh1.add(Newmesh1);
		System.out.println("FinalMesh Info: ");
		System.out.println("nv: " + mesh1.getNv() + "\tnt: " + mesh1.getNt());
		mesh1.toTecplot(dir + "FinalMainEngine2.dat");
		
		mesh1.saveMesh(MeshFormat.msh, dir + "FinalMainEngine.mesh");
	}

}
